import {SAVE_USER} from '../type'

// 同步修改
export const saveUserAction = (data) => {
    return {
        type: SAVE_USER,
        data
    }
}

// 异步修改
export const saveUserAsyncAction = (data) => {
    return (dispatch) => {
        return new Promise((resolve, reject) => {
            setTimeout(() => {
                dispatch(saveUserAction(data))
                resolve(data)
            }, 1500)
        })
    }
}
